package pers.hl.module_main.admin.lib

import pers.hl.lib_global.http.LibResponse
import pers.hl.lib_global.model.bean.Library
import pers.hl.lib_global.mvvm.BaseLibModel

class LibManageModel: BaseLibModel() {

    suspend fun addLibrary(library: Library): LibResponse<Library> {
        return libService.addLibrary(library)
    }

    suspend fun getAllLibraries(): LibResponse<List<Library>> {
        return libService.getAllLibraries(1000)
    }

    suspend fun deleteLibrary(libIds: List<Int>): LibResponse<*> {
        return libService.deleteLibrary(libIds)
    }

    suspend fun searchLibrary(keyword: String): LibResponse<List<Library>> {
        return libService.searchLibrary(keyword)
    }

}
